1. Field of the Invention
The present invention relates in general to the field of information processing, and more specifically to a system and method for spreading a spectrum of harmonic frequencies of a pulse width modulator output signal.
2. Description of the Related Art
Delta-sigma modulators (noise shapers) are particularly useful in digital to analog and analog to digital converters (DACs and ADCs). Using oversampling, a delta-sigma modulator spreads quantization noise power across the oversampling frequency band, which is typically much greater than the input signal bandwidth. Additionally, a delta sigma modulator performs noise shaping by acting as a lowpass filter to the input signal and a highpass filter to the noise; most of the quantization noise power is thereby shifted out of the signal band.
Delta sigma modulators can be combined with a pulse width modulator (PWM) to implement a signal processing system data converter that converts an oversampled input signal into a directly corresponding pulse width modulated output signal. The pulse width modulated output signal can be used to, for example, drive a digital amplifier.
U.S. Pat. No. 5,815,102 entitled “Delta Sigma PWM DAC to Reduce Switching” to John Melanson granted Sep. 29, 1998 (Melanson I), U.S. Pat. No. 6,150,969 entitled “Correction of Nonlinear Output Distortion in a Delta Sigma DAC” to John Melanson granted on Nov. 21, 2000 (Melanson II), and U.S. Pat. No. 6,480,129 entitled “Methods and Apparatus for Correction of Higher Order Delta Sigma Converters” to John Melanson granted on Nov. 12, 2002 (Melanson III), disclose exemplary ways for implementing the modulator and are hereby incorporated by reference.
Referring to FIG. 1, signal processing system 100 represents one utilization of a delta sigma modulator 102 followed by a PWM 104. The digital delta sigma modulator 102 receives a digital input signal x having an oversampled frequency of fos. The data represented by input signal x is originally sampled at sampling frequency fS. The delta sigma modulator 102 provides a noise shaped quantizer output signal q(n) to PWM 104. Each quantizer output signal q(n) is a digital data stream representing one of N different quantization levels. In at least one embodiment, the number of different quantization levels N equals the oversampling ratio (OSR)+1, where N is a positive integer. The OSR equals fos/fS. For example, the nth sample of quantizer output signal q(n) represents the nth sample of input signal x(n) with one of N different quantization levels, i.e. qi(n)ε{0, 1, . . . , N−1}. The quantizer output signal q(n) is the input signal to PWM 104.
The PWM 104 generates a respective PWM pattern for each quantization level of quantizer output signal q(n). The PWM output signal y(n) is a series of frames having a period T. The nth generated PWM pattern represents the nth frame of PWM output signal y(n), where n is an integer. The period T of each PWM output signal equals 1/fs. For each frame of a PWM output signal, the duty cycle of the PWM output signal equals the pulse width duration divided by the period T. Additionally, each frame of PWM output signal y(n) can be divided into 1/fos (i.e. N−1) discrete time slots. Each time slot can be coded with a logical “1” or a logical “0”, where the number of logical 1's in a frame define the pulse widths of PWM output signal y(n).
FIG. 2 depicts the PWM patterns 200 for N=65 quantization levels in Table 1. Table 1 represents one example of the PWM patterns for N=65 quantization levels. The PWM 104 selects a PWM pattern for each received quantizer output signal q(n). Thus, each PWM pattern has a one-to-one (1:1) association with a quantization level as depicted in Table 1. Quantization levels 29–35 represent exemplary low level signals. “Leading Zeros” represents the number of logical “zeros” beginning of a PWM pattern. “Ones” represent the duration of logical “ones” in the PWM pattern and represent the “pulse” in the PWM pattern. The total number of logical ones times the duration of each time slot in a frame of PWM output signal y(n) equals the duration of the pulse width. “Trailing Zeros” represents the number of logical “zeros” after the pulse in the PWM pattern. The PWM output signals of Table 1 represent “centered, grow from the right” patterns with the odd quantization levels (3, 5, . . . ) having centered pulses and the even quantization levels (2, 4, . . . ) having centered right pulses. Other patterns, such as grow from the left or non-centered pulses, can also be used to represent quantization levels.
TABLE 1QuantizationPWM PatternsLevelLeading ZerosOnesTrailing Zeros032032132131231231331330. . .. . .. . .. . .29182917301730173117311632163216331633153416341535153514. . .. . .. . .. . .621621631630640640
The PWM output signal y(n) drives amplifier 106. The amplifier 106 in turn drives a load 108 represented by impedance Z. Load 108 is, for example, one or more audio speakers or a servo motor. In at least one embodiment, the amplifier 106 includes switches 112 and 114 that change conductivity in conjunction with the pulses of PWM output signal y(n). In some applications, such as a power amplifier application, amplifier 106 represents a power amplifier and has a relatively high maximum voltage, such as +30 V, and high maximum current, such as 5 A. Various factors, such as the parasitic capacitances 116 and 118 and parasitic inductance 120, cause the linear amplifier to radiate energy at the switching frequency of switches 112 and 114 and other harmonic frequencies of the switching frequency. It is difficult to shield this radiated energy to prevent leakage into the rest of the system 100. Additionally, the resulting electromagnetic interference (EMI) from the radiated energy can easily exceed EMI standards.
Potential EMI problems with system 100 are particularly acute for audio input signals x(n) that cause pure or approximate square wave PWM patterns in frames of PWM output signal y(n). Generally, low level signals (such as pauses or silence) are the most common cause of pure or approximate square wave PWM patterns in frames of PWM output signal y(n). Delta sigma modulator 102 quantizes each low level input signal sample as alternating or approximately alternating high and low levels. As depicted in Table 1 and FIG. 2, quantization levels 29–35 each cause the PWM 104 to generate a frame of pure or approximate square waves. Square waves and approximate square waves present particularly problematic EMI problems because the switching frequency of switches 112 and 114 approximately equals the sampling frequency fS. The sampling frequency fS often resides in the radio frequency spectrum and is, for example, 384 kHz. Thus, system 100 radiate energy at 384 kHz and at harmonic frequencies of 384 kHz. The radiated energy in the spectrum of harmonic frequencies of PWM output signal y(n) can be significant and exceed EMI standards.
FIG. 3 depicts a frequency analysis 300 of the harmonic frequencies of 384 MHz square waves and approximate square waves between 0 and 8 MHz and energy levels between 0 and −35 dB. The square waves have significant energy at the fundamental harmonic frequency of 384 kHz and significant energy at higher harmonic frequencies. As depicted in FIG. 3, significant energy resides in the radio frequency (RF) spectrum. FIG. 4 depicts a frequency analysis 400 of frequencies between 0 and 25 MHz and energy levels between 0 and −200 dB with significant energy at the harmonic frequencies of 384 MHz.